function getReplyUrl() {
    let elements = document.getElementsByClassName('locked');
    const regex = /http:\/\/bbs.gfan.com\/forum.php\?mod=post.*action=reply.*?/;
    for (const elem of elements) {
        for (const elemA of elem.getElementsByTagName('a')) {
            const href = elemA.getAttribute('href');
            if (regex.test(href)) {
                return href;
            }
        }
    }
    return null;
}


getReplyUrl();